### Regex format details

Regex-formatted sources let you apply a structure to arbitrary strings passed in
from file sources. This is particularly useful when processing unstructured log
files.

- To parse regex strings, Materialize uses
  [rust-lang/regex](https://github.com/rust-lang/regex). For more detail, refer
  to its [documented syntax](https://docs.rs/regex/latest/regex/#syntax).
- To create a column in the source, create a capture group, i.e. a parenthesized
  expression, e.g. `([0-9a-f]{8})`.
    - Name columns by...
      - Using the _col&lowbar;name_ option when creating the source. The number
        of names provided must match the number of capture groups.
      - Creating named captured groups, e.g. `?P<offset>` in
        `(?P<offset>[0-9a-f]{8})` creates a column named `offset`.

        Unnamed capture groups are named `column1`, `column2`, etc.
- We discard all data not included in a capture group. You can create
  non-capturing groups using `?:` as the leading pattern in the group, e.g.
  `(?:[0-9a-f]{4} ){8}`.
